import LogItem from "./LogItem";
import "./Logs.css";
import Card from "./UI/Card/Card";

const Logs = (props) => {
  // 模拟一条从服务器加载的数据

  // 遍历
  const logItemData = props.logsData.map((item) => (
    <LogItem key={item.id} date={item.date} desc={item.desc} time={item.time} />
  ));
  return (
    <Card className="logs">
      {/* <LogItem date={new Date(2021, 2, 26, 19, 0)} desc="学习Nest" time="50" /> */}
      {/* 遍历 */}
      {logItemData}
    </Card>
  );
};

export default Logs;
